<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<c:url value='/css/bootstrap.css' />" rel="stylesheet">
<title>Money for nothing - Accounts</title>
</head>
<body>
	<%@include file="logbar.jsp"%>
	<div class="container offset-content">
		<%@include file="title.jsp"%>
		<div class="span12 subnav">
			<ul class="pagination">
				<li><a href="<c:url value="/" />">Home</a></li>
				<li class="active"><a href="<c:url value='/accounts'/>">Accounts</a></li>
				<li><a href="<c:url value='/transfers/generate'/> ">Transfers</a></li>
			</ul>
			<ul class="breadcrumb">
				<li class="active"><a href="#">Accounts</a></li>
			</ul>
		</div>
		<fieldset class="span12">
			<legend>Accounts</legend>
			<table class="table table-striped">
				<thead>
					<tr>
						<th>Account Name</th>
						<th>Type</th>
						<th>Balance ($)</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${accountList}" var="account">
						<tr>
							<td>${account.accountName}</td>
							<td>${account.accountType}</td>
							<c:choose>
								<c:when test='${account.accountAmount < "0"}'>
									<td class="amount">${account.accountAmount}</td>
								</c:when>
								<c:otherwise>
									<td>${account.accountAmount}</td>
								</c:otherwise>
							</c:choose>
							<td><a
								href="<c:url value='/accounts/${account.accountName}/${currentDate.getYear()}/${currentDate.getMonthOfYear()}/1' />">Details</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</fieldset>
		<%@include file="footer.jsp"%>
	</div>
</body>
</html>